added SSCLI 1.0
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / CppCLINETAssemblyWrapper / CppCLINETAssemblyWrapper.h
blobf1be0108b7bcaed19b200b77102316b581fc0bcb
1 /****************************** Module Header ******************************\
2 Module Name: CppCLINETAssemblyWrapper.h
3 Project: CppCLINETAssemblyWrapper
4 Copyright (c) Microsoft Corporation.
6 The code in this file declares the C++ wrapper class CSSimpleObjectWrapper
7 for the .NET class CSSimpleObject defined in the .NET class library
8 CSClassLibrary. Your native C++ application can include this wrapper class
9 and link to the DLL to indirectly call the .NET class.
11 CppCallNETAssemblyWrapper (a native C++ application)
12 -->
13 CppCLINETAssemblyWrapper (this C++/CLI wrapper)
14 -->
15 CSClassLibrary (a .NET assembly)
17 This source is subject to the Microsoft Public License.
18 See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
19 All other rights reserved.
21 THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
22 EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
23 WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
24 \***************************************************************************/
26 #pragma once
28 #include <windows.h>
30 #ifdef CPPCLINETASSEMBLYWRAPPER_EXPORTS
31 #define SYMBOL_DECLSPEC __declspec(dllexport)
32 #else
33 #define SYMBOL_DECLSPEC __declspec(dllimport)
34 #endif
37 // This native C++ class wraps the C# class CSSimpleObject defined in the
38 // .NET class library CSClassLibrary.
39 class SYMBOL_DECLSPEC CSSimpleObjectWrapper
41 public:
42 CSSimpleObjectWrapper(void);
43 virtual ~CSSimpleObjectWrapper(void);
45 // Property
46 float get_FloatProperty(void);
47 void set_FloatProperty(float fVal);
49 // Method
50 HRESULT ToString(PWSTR pszBuffer, DWORD dwSize);
52 // Static method
53 static int GetStringLength(PCWSTR pszString);
55 private:
56 void *m_impl;